import { exInput, exIcon, exSizeSelect, exSelect, exSwitch, exRequestData } from '@ve/common/components/extension'
export default {
  VERSION: '20220506',
  type: 'uiTolead',
  name: '导入',
  icon: 'folder-upload-fill',
  svg: 'daoru',
  //数据别名
  // dataName: 'uiTolead_data',
  //数据集合 表单 列表等等
  data: {
    requestData: {},
  },
  isChecked: true,
  extension: {
    templateUrl: exInput('模板下载URL', '', '模板下载需要'),
    templateMethod: exInput('模板method', '', '模板下载需要'),
    // subSystem: exInput('子系统', '', '模板下载需要'),
    // tableName: exInput('表名称', '', '模板下载需要'),
    // tableMethod: exInput('查询method', '', '模板下载需要'),
    templateName: exInput('模板名称', ''),
    toleadUrl: exInput('导入URL', ''),
    toleadMethod: exInput('导入method', ''),
    templateOptions: {
      type: 'exTolead',
      name: '模板配置',
      value: [{ TABLE_NAME: '', FIELD_NAME: '', EXPORT_SHEET_NAME: '', customize: [] }],
    },
    requestData: exRequestData('自定义参数', [{ key: '#TEMPLATE_ID#', value: '' }]),
    getTable: {
      type: 'exGetDownload',
      name: '完成后需要刷新的表格',
      title: '完成后需要刷新的表格',
      value: [],
      hasCheckbox: false,
      treeData: '$getPageModules',
    },
    getTableData: {
      type: 'exGetDownload',
      name: '绑定数据表格',
      title: '绑定数据表格',
      value: [],
      hasCheckbox: false,
      treeData: '$getPageModules',
    },
    size: exSizeSelect('尺寸', 'mini'),
    icon: exIcon('图标选择器', ''),
    value: exInput('名称', '导入'),
    type: exSelect('颜色类型', '', [
      { value: '', label: '默认' },
      { value: 'text', label: '文字' },
      { value: 'primary', label: '蓝色' },
      { value: 'success', label: '绿色' },
      { value: 'info', label: '灰色' },
      { value: 'warning', label: '黄色' },
      { value: 'danger', label: '红色' },
    ]),
    round: exSelect('圆角', false, [
      { value: true, label: '是' },
      { value: false, label: '否' },
    ]),
    circle: exSelect('圆形', false, [
      { value: true, label: '是' },
      { value: false, label: '否' },
    ]),
    plain: exSelect('朴素按钮', false, [
      { value: true, label: '是' },
      { value: false, label: '否' },
    ]),
    disabled: exSwitch('禁用', false),
    hidden: exSwitch('隐藏', false),
    errorTable: exSwitch('展示错误列表', false),
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  logicInstruction: [],
}
